const {Sequelize,Model} = require('sequelize');
const sequelize = require('../db/index')
class Article extends Model{}

Article.init({
  article_id:{
    type:Sequelize.INTEGER(11),
    autoIncrement:true,
    primaryKey:true
  },
  title:{
    type:Sequelize.STRING,
    allowNull:false
  },
  content:{
    type:Sequelize.TEXT,
    allowNull:false
  },
  kp_id:{
    type:Sequelize.INTEGER(11),
    field:'kp_id'
  }
},{
    sequelize,
    tableName:'article'
})

module.exports = Article;